package com.jungle.sp.daily.feature.d8_structured_concurrency;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

/**
 * @author Jungle
 * @create 2024-07-14 9:46
 */
public record DeptTask() implements Callable<String> {
    @Override
    public String call() throws Exception {
        System.out.println("查询部门信息开始");
        TimeUnit.SECONDS.sleep(1);
        // String str = null;
        // int length = str.length();
        System.out.println("查询部门信息结束");
        return "所属部门：教研部";
    }
}
